altered map format so coords of items are first
Cleaned up source code