Bug fixes n clean up