Fixed issues, some clean-up