base: eval is evil

* Using ast.literal_value instead of eval to parse user provided values. Safer and more reliable (`bool("False") -> True`)
* Removing the checks that the new type corresponds with the known type for the variables.
* Adding some tests.
* PEP8/PEP257