Fixed demo issue, removed unused code