Removed unused parameters/functions
Fixed missing default case values