Cleanup on getMethods method