Added basic comments and solved map bugs