Fixes and now reasonably working