Refactor to Rx
Move index to public folder