finished cleaning it up and making it static and self contained