Cleaning up V1 code