Fixed missing self. and minor changes...