Added a simple test and fixed something. This version is now running on reddit