Bugs fixed, performance enhanced