Improve code quality and add grid lines to minimaps