Removed un-used code. Minor fixes here and there.