Correct installation errors; Code Cleanup