Cleaning up, adding types