Reduced complexity in code, added comments and added new github badges