Refactor to put classes in proper packages