ticket:59 Fixed timestamp dublicates, refactored map code a bit