Adding entities and associated tests
main entity state transitions implemented and tests added