Cleaned up a few files, added publishing, fixed registering.