removed closing php tag
fixed layout
added update checks