Added Edit button and fixed ? operator