Simple queue implementation. Generic method and Generic classes