Bugs fixing. Clean up.