Added more code style changes and additional checks in mapmgr