minor changes added garbage collector to keep memory usage down

accidentally added the server class for the client, but deleted it again and re-committed