Bug Fix

Improved speed and bug fixes