Refactoring / Optimization

Also removed demo page