serious remake and cleanup