Moved CustomAdapter class to its own file.