Added initial mapping functionality

Please check and make sure all the changes are acceptable