fix next subject button
fix some bugs; integrate metadata
stylin
clean up code