Removed some hardcoded stuff.
Added logging stuff.