Fixed demo code using libstd.
Added missing lang items and cleaned up the reset.