add replace method to arrays.class
fix all updating bugs (component updating now works!)