Changed return types to fit new error system