Fix int/float bug and minor cleanup