Eliminated malloc in code.
Merge pull request #1 from nbarros/malloc

Eliminated malloc in code.