Work in progress
technically sound! Removing comments, some variables missing