Version 4.0

Adds Ajax refreshing, updates templates, automatically do template replacement.