Better file organization; fixed issues with missing libraries