Reorganized project so it has less code duplication