refactor libraries out of app folder