Integer from byte array parsing. Needs refactoring.