Added mapper class and changed structure.