Refactoring flat object for statics

Feature request for #36

This includes PR #37