Added common layer and data layer and unit tests