reformatted

now it's a bit more readable though it's not so clear where these functions come
from, there wasn't really any reason for these functions to be static anyway :P