Fixed init and function stuff