refactor of malloc calls

there were unnecessary type casts in malloc calls
in standard AINSI C void * are automatically to the correct type

closes #5