Added self as a field variable in init and removed self vars from functions