works somewhat better.. some cleanups and similiar