Cleaned up SQL interface as an abstract class and updated Update