python float fix and wrong variable names
added merge option
nested functions to fix js errors