Updating structure to make it easier to test and run internal methods