Started designing the core library

This is a work-in-progress... much will change.