Polised code, added some comments and summaries for classes and methods