Split demo into two separate demos
Added unit tests