I don't consider the code to be messy. There's a lot of code because of the extra features that the template/theme has compared to a plain template/theme. Most of the functions, from what I've seen, are located in the functions.php file. Now this is in regards to WordPress themes. I haven't played around much with Joomla templates. Is there something in particular you're wanting to edit or modify?