Cleaned up code, removed map padding