Implemented changes to create JUB2048

Code is derived from Gabriele Cirulli and Jason LaFerrera, with minor
editing by me