Resolves major issues reported by SonarQube. (EKT/FSM-Engine/#2)