Yes, i think code can be even simpler, but i don't have much time atm to work on that.