First Decent version

Did my first good whack at it, now going to clean it up.