Removed Map functionality + refactored js functions