Named the anonymous functions

Now the functions are seperate and not inside each other.  Good idea?
Bad idea?