Small refactor and functionality checks