Made most methods static. Fixed autocommit issues