Removed some duplication and none-needed blocks.

Signed-off-by: Tabor Kvasnicka <kamakwazee@hotmail.com>