Added trim function
Added support for configuration file