updated man page for Map Register function
Modified the USAGE definition
cleaned up and optimized the code