Cleaned up some code for membership