Several changes to improve performance

In particular, changed `Integer` by `Int` at several declarations.
Also, minor changes in the way of handling strings