Added some sample functions from the RogueBasin tuts