Pusing demo code and some bug fixes probably