Initial commit using some code adapated from Drew Fisher.