Fixed variables for OO principle to program against interfaces and made destroyMap method