Cleaned up app module, minor fixes in library module