Implemented memory mapping to increase performance