Some refactoring to keep eclipse happy