Finally fix dependencies, rewrite menus codes

Fixed crash problems on reload with menus (now starts a new process in
order to avoid conflicts).