Minor refactoring, fill missing type signatures