Refactors and some more basics

Tab system changes + fixes, some layout changes, css additions +
cleanup, some JS basics added