Removing warnings
Removed unused code
Fixed access issues