Added some option
General cleaning of code