Refactor code and create light interface