Refactor and remove extraneous files