Added core module and shuffled things around so they're in more appropriate locations.