Small fixes + size optimizations