Code clean up and added enums

See title