Add free format support and cleanup