Bug fixing and new stuff