Moved all SLOT functions to separate source file.