Refactor, use constructor pattern, improve demo