Added missing debug module.
Removed all warning during compilation.
Memory opitimisations.