Clean up code to create lists, add markdown support