Major refactor - custom modules in lib/, demo in examples/