Trying to delete the layout directory, which seems to be problematic somehow.
Change signature of 'format' to match the actual arguments, to prevent loss due to type casting ('substitute' takes ints, not doubles).
removed dead code