Handling more column types. Also fixed bug in optional field.