Master improved

Here is the merged master with my most recent code. 
Sorry for the delay.