fixed some weird parsing and server behaviours
generic class for running scripts