Moves everything except module table out of core module for #79.
Merges conflicts with branch issue79 for #79.