Best practice violations fixed