Changed namespace.
Renamed module.
Easier to read.
Easier to read.
Removed nested if-statements.