move main app files into lib
add gitignore
omg tests, performance tanked?