Few logic fixes, remove deprecated module