a bit of refactoring, put litecoin back in