Better file organization; fixed issues with missing libraries

Fixed file organization issues