Commented code, minor code changes and updated README