better structure + fixes