Refactor coordinates normalization a bit