I would suggest separating the library & GUI code so that the library portion can be used in projects without requiring Nana.