updates, some cleaning, standalone port