Improved demo project appearance, fixed some memory management issues