rewrote framework, starting require AMD stuff