move external libraries to /external
add text/states (by Samuli)