Main classes refactored

Card related API complete
100% unit test coverage