Major bug fixes

Also mappings file has warning.