Cleaner code
Added a Demo app