An attempt to improve performance - don't use inner classes (non-static nested)