First Tested version, fixed some bugs.