Cleaned up code and add link to wiki entry