dev+: better encapsulation and logging