fix map rendering; beautify code