Finished #11
Finished #13
Fixed #9

refactored:
-The cardUnits logic with in multiple places, created a new common function.
- Removed an unused function