Implemented alphabetical and character sorting methods.