General improvements, better initialization