Fixed many, many, bugs