Added SQL execute and general clean-up