Build core objects in subdirectory, fixes issue #82
Merge pull request #218 from sej7278/master

Build core objects in subdirectory, fix issue #82 and fix #218
Made all the changes into one commit that could be a patch for master