updated to now check for updates and some code clean up