Turn it into a proper library