Moved project files into separate directories

Also factored out reusable sources