Refactor + More functionality