Cleaned up some organizational code