Cleaned up code. Added Yes/No dialog