Cleaned up dropdown menu code