switched readme to markdown
added comments and moved tests to their own function
switched readme to markdown