added in-memory persistence layer, persistence controller and JUnit
tests for persistence functions