Resolved a lot of errors & warnings