Added enums and minor refactot

Change-Id: I26aaeb4817d6f40d84a237b3f6a24ee1317f0fe3