Removed many bugs.