fixed error class, now uses bootstrap defined class
fixed submit button position
added api documentation
centralised core functionality
fixed api documentation