Fixed issue #29, Changed the upgrading procedure to a much simpler one. Ready for 0.5