Jp361-- Collapsed duplicate code into one file.

#361