Refactor Space concept with Generics