cleanup and added licencing stuff