Made grid manager generic
Minor fixes