Massive enhancement and bug fixes