Added configuration support and the main file. Changed the connection class.