Remove static from non-static vars; Fix unit tests