Cleanup and simplify building

Some general cleanup, and #include additions which should simplify building, especially for new users.