Fixed include GUARDS and NULL pointers.
Implemented assignment operator.
Merge pull request #171 from simongog/improve_code

Fixed include GUARDS and NULL pointers.