[DO NOT MERGE] Initial commit of refactor. Still contains old code.