Full testing, bugs fixed