Fixed minor bugs and updated demo pages