Implementing CardsHandler

Plus some code and file cleanup