Moved many things around to keep the top level more clean