Add support for default values, correct jquery references causing document ready handler to be called multiple times