Refactoring base code for more logical data storage