Simplify initalization code