Completed compare functionality and fixed issues