Took the good bits of PR16 by zeuslightning125, as he refused to fix it.