Add custom format support

Closes #36