Some refactor and finalized the level getter.