Refactor and remove disused methods