extracts operations to their own classes, adds basic exception handling