Some bug fixes and the 'update' command.
Fixed major bug.