Remove unused variables and macros
Merge pull request #940 from miguelgarciaarribas/remove_vars

Remove unused variables